package com.ygqh.baby.po;

import java.util.Date;

import com.ygqh.baby.ao.DataStatus;
import com.ygqh.baby.utils.DateConvertUtils;

public class YgUserMember {
   private Long id;

    private Long userId;

    private Date memberStartTime;

    private Date memberEndTime;

    private Date shippingEndTime;

    private Long inviterId;

    private Date createTime;

    private String createBy;

    private Date updateTime;

    private String updateBy;

    private DataStatus status;

    private String remark;
    
	private String paymentCode;

	private YgUser ygUser;

	public YgUserMember() {
		super();
	}

	public YgUserMember(Long userId, Date memberStartTime, Date memberEndTime) {
		super();
		this.userId = userId;
		this.memberStartTime = memberStartTime;
		this.memberEndTime = memberEndTime;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getCreateBy() {
		return createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getUpdateBy() {
		return updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	public DataStatus getStatus() {
		return status;
	}

	public void setStatus(DataStatus status) {
		this.status = status;
	}

	public Date getMemberStartTime() {
		return memberStartTime;
	}

	public void setMemberStartTime(Date memberStartTime) {
		this.memberStartTime = memberStartTime;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Date getMemberEndTime() {
		return memberEndTime;
	}

	public void setMemberEndTime(Date memberEndTime) {
		this.memberEndTime = memberEndTime;
	}

	public YgUser getYgUser() {
		return ygUser;
	}

	public void setYgUser(YgUser ygUser) {
		this.ygUser = ygUser;
	}

	public Boolean isMembersValid() {
		if (memberEndTime == null) {
			return false;
		} else if (DateConvertUtils.getDateStart(new Date()).after(memberEndTime)) {
			return false;
		}
		return true;
	}

	public String getPaymentCode() {
		return paymentCode;
	}

	public void setPaymentCode(String paymentCode) {
		this.paymentCode = paymentCode;
	}

	public Date getShippingEndTime() {
		return shippingEndTime;
	}

	public void setShippingEndTime(Date shippingEndTime) {
		this.shippingEndTime = shippingEndTime;
	}

	public Long getInviterId() {
		return inviterId;
	}

	public void setInviterId(Long inviterId) { 
		this.inviterId = inviterId;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	
}